package com.example.spring_boot_demo.service;

import com.example.spring_boot_demo.dto.GoodsRequest;
import com.example.spring_boot_demo.utils.AjaxResult;
import org.springframework.transaction.annotation.Transactional;

/**
 * <P> @Author: SongKeCheng
 * <P> Description:
 * <P> Type: Interface
 * <P> Date: 2024/5/29:19:48
 */

public interface GoodsService {
    /**
     * 分页查询信息
    */
    AjaxResult findGoods(GoodsRequest goodsRequest);

    /**
     * 根据id 删除商品信息
    */
    AjaxResult deleteGoods(GoodsRequest goodsRequest);

    /**
     * 根据id 更新商品信息
     */
    AjaxResult updateGoods(GoodsRequest goodsRequest);

    AjaxResult addGoods(GoodsRequest goodsRequest);

    @Transactional
    AjaxResult testTransactional(GoodsRequest goodsRequest);
}
